/**
 * Created By zuoW 2018/3/26
 * 主运单api
 */
import axiosUtils from '@api/env/axiosEnv'

let customAxios = axiosUtils._initAxios()

// 智享箱情,excel数据导入
export function putExcelContainerList (param) {
  return customAxios({
    url: '/main/XlContainers/putExcelContainerList',
    timeout: 1200000,
    method: 'post',
    data: param,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

// 批量删除,箱子
export function batchDeleteContainers (param) {
  return customAxios({
    url: '/main/XlContainers/batchDeleteContainers',
    method: 'post',
    data: {
      ids: param.ids
    }
  })
}

// 分页查询
export function getDataByPage (param) {
  return customAxios({
    url: '/main/XlContainers/getDataByPage',
    method: 'post',
    data: param
  })
}

//  获取箱子状态列表
export function getStateList (param) {
  return customAxios({
    url: 'main/XlContainers/getStateList',
    method: 'post',
    data: param
  })
}

//  获取场站位置列表
export function getContainersPositionList (param) {
  return customAxios({
    url: '/main/XlContainers/getContainersPositionList',
    method: 'post',
    data: param
  })
}

//  获取箱子箱型列表
export function getContainersTypeList (param) {
  return customAxios({
    url: '/main/XlContainers/getContainersTypeList',
    method: 'post',
    data: param
  })
}

//  获取箱子当前使用记录中的轨迹
export function getPositionTrack (param) {
  return customAxios({
    url: '/main/XlContainersHistoryPosition/getPositionTrack',
    method: 'post',
    data: param
  })
}

//  获取箱子使用历史记录
export function getHistoryData (param) {
  return customAxios({
    url: '/main/XlContainersHistory/getHistoryData',
    method: 'post',
    data: param
  })
}

//  获取场站预警列表(超量预警)
export function getStationWarningList (param) {
  return customAxios({
    url: '/main/XlContainers/getStationWarningList',
    method: 'post',
    data: param
  })
}

// 获取场站预警箱型统计
export function getStationContainerTypeStatics (param) {
  return customAxios({
    url: '/main/XlContainers/getStationContainerTypeStatics',
    method: 'post',
    data: param
  })
}

//  获取径路集装箱列表(超量预警)
export function getWayContainersList (param) {
  return customAxios({
    url: '/main/XlContainers/getWayContainersList',
    method: 'post',
    data: param
  })
}

//  获取报表当前站字典
export function getCurStationList (param) {
  return customAxios({
    url: '/main/XlContainersReport/getCurStationList',
    method: 'post',
    data: param
  })
}

//  箱属字典
export function getContainersHeaders (param) {
  return customAxios({
    url: '/main/XlContainersReport/getContainersHeaders',
    method: 'post',
    data: param
  })
}

//  获取报表内容
export function getTotalDataByPage (param) {
  return customAxios({
    url: '/main/XlContainersReport/getTotalDataByPage',
    method: 'post',
    data: param
  })
}

//  报表箱子历史内容
export function getContainerHis (param) {
  return customAxios({
    url: '/main/XlContainersReport/getContainerHis',
    method: 'post',
    data: param
  })
}

//  超时预警列表
export function getContainersTimeWarning (param) {
  return customAxios({
    url: '/main/XlContainersHistory/getContainersTimeWarning',
    method: 'post',
    data: param
  })
}

// 超时预警箱子动态
export function getContainersDynamic (param) {
  return customAxios({
    url: '/main/XlContainersHistory/getContainersDynamic',
    method: 'post',
    data: param
  })
}

//  超时预警列表
export function getTimeWarningList (param) {
  return customAxios({
    url: '/v2/main/TimeWarning/getList',
    method: 'post',
    data: param
  })
}

// 超时预警箱子动态
export function getDynamicList (param) {
  return customAxios({
    url: '/v2/main/TimeWarning/getDynamicList',
    method: 'post',
    data: param
  })
}

// 获取场站超量预警列表
export function getStationOverbalanceWarningList (param) {
  return customAxios({
    url: '/main/XptStationInfo/getStationOverbalanceWarningList',
    method: 'post',
    data: param
  })
}
